#define _CRT_SECURE_NO_WARNINGS 1

int missingNumber(int* nums, int numsSize)
{
    int i, cur = 0;
    for (i = 0; i <= numsSize; i++)
    {
        cur ^= i;
    }
    for (i = 0; i < numsSize; i++)
    {
        cur ^= nums[i];
    }
    return cur;
}
